home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mastering Web Site Development
/
Microsoft Mastering Web Site Development (Microsoft) (1997).iso
/
Media
/
Ch05
/
W05D010.cc2
< prev
next >
Wrap
Text File
|
1997-04-24
|
1KB
|
22 lines
0, In this demonstration, you will learn how to add
3, VBScript code to a Web page using Visual InterDev.
8, Open the page you want to add client-side script to
11, with the Visual InterDev Source Editor. Then add
16, a <SCRIPT> section to the <HEAD> section of the page.
27, You can add the <SCRIPT> tags anywhere in the HTML
30, document, but it's easiest to add them to the top
33, of the file. Now set the LANGUAGE attribute to
36, VBScript. Inside the <SCRIPT> tags I can add any
45, VBScript code I want. For example, I can declare a
49, variable with dim x and set it equal to a value: x = 5.
57, Then I can use a MsgBox function to output the
64, variable x. Any code inside the <SCRIPT> tags that is
70, not part of a procedure will be run when the
72, document is first loaded into the browser. Let's save
76, this file and view it with the Visual InterDev
78, browser. Select Preview in Browser. Notice that the
87, message box runs, displaying the value of 5. When I
91, dismiss the message box, the rest of the page is
94, rendered. So, now you've seen how to add
97, initialization code to a Web page.
100, END